<template>
  <div>
    <el-table
      :row-class-name="fmcsTableRowClassName"
      :data="mydata"
      style="width: 90%;margin:0 auto;color:#333333"
      :header-cell-style="{background:'#9BECFD',color:'#333333'}"
    >
      <template slot="empty">
        <p class="empty_text">无一级报警</p>
      </template>
      <el-table-column prop="date" label="日期" width="auto" align="center"></el-table-column>
      <el-table-column prop="hour" label="时间" width="auto" align="center"></el-table-column>
      <el-table-column prop="description" label="报警名称" width="280" align="center"></el-table-column>
      <el-table-column prop="user" label="记录人" width="auto" align="center"></el-table-column>
      <el-table-column prop="result" label="处理结果" width="auto" align="center"></el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  props: ["mydata"],
  data() {
    return {
      tableData: [ ]
    };
  },
  methods: {
    fmcsTableRowClassName({ row, rowIndex }) {
      if (rowIndex % 2 == 1) {
        return "statistics-warning-row";
      } else {
        return "";
      }
    }
  },
  computed: {}
};
</script>
<style lang="scss" scoped>
/deep/.el-table__row.statistics-warning-row {
  background-color: #def6fb;
}
.empty_text {
  font-size: 24px;
}
</style>